﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Text;
using System.Xml;
using LitJson;
using MediaPortal.GUI.Library;
using System.Threading;
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.IO;
using System.Net;

public class TimeoutWebClient : WebClient
{
    private int _timeOut = 2000;
    public int TimeOut
    {
        get
        {
            return _timeOut;
        }
        set
        {
            _timeOut = value;
        }
    }

    protected override WebRequest GetWebRequest(Uri address)
    {
        WebRequest webRequest = base.GetWebRequest(address);
        webRequest.Timeout = _timeOut;
        return webRequest;
    }
}